package com.es.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 如果是es7不用写type
 * @author 顾志杰
 * @date 2020/8/20-9:30
 */
@Document(indexName = "stu",type = "_doc")
@Data
public class Stu {

    @Id
    private Long stuId;

    @Field(store = true)
    private String name;

    @Field(store = true)
    private Integer age;

    @Field(store = true)
    private Float monty;

    @Field(store = true,type = FieldType.Keyword)
    private String sign;

    @Field(store = true)
    private String description;

}
